package com.ruoyi.mdm.mapper;

import com.ruoyi.mdm.domain.*;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * sku主档Mapper接口
 *
 * @author shiseido
 * @date 2025-03-01
 */
@Repository
public interface SkuSampleMapper {
    /**
     * 查询sku主档
     *
     * @param id sku主档主键
     * @return sku主档
     */
    public SkuSampleEntity selectSkuSampleById(Long id);

    public List<SkuSamplePriceEntity> selectSkuSampleValue(SkuSamplePriceEntity entity);

    /**
     * 查询sku主档
     *
     * @param skumCode skum编码
     * @return sku主档
//     */
//    public List<SkuSampleEntity> selectSkuSampleBySkumCode(String skumCode);

    /**
     * 查询sku主档
     *
     * @param spuCode spu编码
     * @return sku主档
     */
//    public List<SkuSampleEntity> selectSkuSampleBySpuCode(String spuCode);

    /**
     * 查询sku主档
     *
     * @param ownerId   品牌代码
     * @param goodsCode sku编码
     * @return sku主档
     */
    public SkuSampleEntity selectSkuSampleByGoodsCode(@Param("ownerId") String ownerId,
                                                @Param("goodsCode")String goodsCode);

    /**
     * 查询sku主档列表
     *
     * @param SkuSampleEntity sku主档
     * @return sku主档集合
     */
    public List<SkuSampleEntity> selectSkuSampleList(SkuSampleEntity SkuSampleEntity);

    public SkuSamplePriceEntity getSkuMaxMinPrice(SkuSamplePriceEntity skuSamplePriceEntity);

    public List<SkuSampleEntity> getOneSku(SkuSampleEntity SkuSampleEntity);

    public int updateSkuSample(SkuSampleEntity SkuSampleEntity);

//    /**
//     * 批量删除sku主档
//     *
//     * @param ids 需要删除的数据主键集合
//     * @return 结果
//     */
//    public int deleteSkuSampleByIds(Long[] ids);

    public int insertSkuSamplePriceCalErrorLog(SkuSamplePriceCalErrorEntity skuSamplePriceCalErrorEntity);


    public int insertSkuSamplePriceCalLog(SkuSamplePriceEntity skuSamplePriceEntity);

    public int insertSkuSampleUpdateLog(SkuSampleUpdateLog skuSampleUpdateLog);

    public int updateSkuSampleUpdateLog(SkuSampleUpdateLog skuSampleUpdateLog);


    public int updateSkuSamplePrice(SkuSamplePriceEntity skuSamplePriceEntity);


    public SkuSamplePriceEntity getSkuSamplePriceBySkuCode(@Param("ownerId") String ownerId,
                                                @Param("skuCode")String skuCode, @Param("skumCode")String skumCode);

    public List<SkuSamplePriceCalErrorEntity> getSkuSamplePriceCalErrorLog(SkuSamplePriceCalErrorEntity SkuSampleEntity);


    public List<SkuSampleUpdateLog> getSkuSampleUpdateLog(SkuSampleUpdateLog SkuSampleEntity);


    public List<SkuSampleEntity> getNewAddSkuList();

    public SkuNewOrderSkuEntity getOneNewOrderSku(SkuNewOrderSkuEntity skuNewOrderSkuEntity);

    public List<SkuNewOrderSkuEntity> getNewOrderList(String[] ownerIdArr);
    public List<SkuNewOrderSkuEntity> getNewOrderListTwo();

    public SkuNewOrderSkuEntity getOneNewOrderTimes(SkuNewOrderSkuEntity skuNewOrderSkuEntity);

    public List<SkuEmailAddressEntity> getSkuEmailAddressList();


    //spu_master_data
    public int pushToSpuMasterData();

    //skum_master_data
    public int pushToSkumMasterData();

    //sku_data
    public int pushToSkuData();

    //posm_value_data
    public int pushToPosmValueData();

    public int truncateTablesSkuData1();
    public int truncateTablesSkuData2();
    public int truncateTablesSkuData3();
    public int truncateTablesSkuData4();
    public int truncateTablesSkuData5();
    public int truncateTablesSkuData6();
    public int truncateTablesSkuData7();

    public List<SkuPriceEntity> skuPriceCal4SkuSample(@Param("ownerId") String ownerId, @Param("skumCode")String skumCode);

}
